import logging

import pytest
class Testa():
    def setpu_moader(self):
        print('执行用例')
    def teardown_moader(self):
        print('清理缓存')
    def testdl(self):
        try:
            url="http://10.59.9.18/small/user/v1/login"
            body={"phone":"16619948760","pwd":"123456Aa"}
            r=reversed(url=url,json=body)
            print(r.json())
        except Exception as e:
            logging.log(e)
        assert "登录成功" in r.text


    def testckgwc(self):
        try:
            url="http://10.59.9.18/small/order/verify/v1/syncShoppingCart"
            body={"phone":"16619948760","pwd":"123456Aa"}
            r=reversed(url=url,json=body)
            print(r.json())
        except Exception as e:
            logging.log(e)
        assert "添加成功" in r.text

    def testgwclb(self):
        try:
            url="http://10.59.9.18/small/order/verify/v1/findShoppingCart"
            body={"phone":"16619948760","pwd":"123456Aa"}
            r=reversed(url=url,json=body)
            print(r.json())
        except Exception as e:
            logging.log(e)
        assert "登录成功" in r.text

    def testzhifu(self):
        try:
            url="http://10.59.9.18/small/order/verify/v1/pay"
            body={"phone":"16619948760","pwd":"123456Aa"}
            r=reversed(url=url,json=body)
            print(r.json())
        except Exception as e:
            logging.log(e)
        assert "支付成功" in r.text

    def testchakandingdan(self):
        try:
            url="http://10.59.9.18/small/order/verify/v1/findOrderInfo"
            body={"phone":"16619948760","pwd":"123456Aa"}
            r=reversed(url=url,json=body)
            print(r.json())
        except Exception as e:
            logging.log(e)
        assert "查看成功" in r.text